/*
 * Copyright (c) 2022-2022 All rights Reserved.
 */

package com.driving.core.service;

import java.util.Map;

import com.driving.core.base.IBaseService;
import com.driving.core.entity.Diary;

/**
 * 日记服务
 *
 * @author SAGITTAR
 * @since 2017
 */
public interface IDiaryService extends IBaseService<Diary> {

    /**
     * 记录日记
     *
     * @param diary diary
     * @return 记录日记
     */
    Map<String, Integer> recordDiary(Diary diary);

    /**
     * 日记点赞
     *
     * @param diaryId diaryId
     * @return 日记点赞
     */
    boolean diaryThumbUp(int diaryId);

    /**
     * 分页查询日志，按照指定排序规则
     *
     * @param order order
     * @param currentPage currentPage
     * @return 分页查询日志，按照指定排序规则
     */
    Map<String, Object> selectDiaryByOrder(String order, int currentPage);
}
